package com.twu.biblioteca.Models;

public class SessionManager {

    private Session currentSession;

    public SessionManager() {
        currentSession = new Session(false, 1111110);
    }

    public boolean isCurrentSessionLoggedIn() {
        return currentSession.isSessionLoggedIn();
    }

    public int getCurrentSessionId() {
        return currentSession.getSessionID();
    }

    public void setCurrentSessionId(int username) {
        currentSession.setSessionID(username);
        currentSession.setSessionLoggedIn(true);
    }

    public void endCurrentSession() {
        currentSession.setSessionLoggedIn(false);
        currentSession.setSessionID(111110);
    }
}
